package com.itheima.Demo;

import java.io.File;

public class Demo01File的构造方法 {
    public static void main(String[] args) {
        File f1 = new File("C:\\Users\\97622\\Desktop\\123.txt");
        System.out.println(f1);
        File f2  = new File("C:\\Users\\97622\\Desktop\\35.txt");
        System.out.println(f2);
        //public File(String parent, String child)
        //给定父路径和子路径创建File对象
        File f3  =  new File("C:\\Users\\97622\\Desktop","123.txt");
        System.out.println(f3);
        //public File(File parent, String child)
        //给定父路径的File类型和子路径创建File对象
        File f4 = new File("C:\\Users\\97622\\Desktop");
        File f5  = new File(f4,"124.txt");
        System.out.println(f5);

    }
}
